Server check guard change 7 x#4100
Conversation
…d fix root component internal page check
|
This pull request has been automatically marked as stale because it has not had Allowing pull requests to close as stale helps us filter out old work that is no longer All pull requests closed by this bot act like normal pull requests; If these changes are still relevant then please comment and/or rebase your PR based on the |
|
This pull request has been closed automatically. If these changes are still relevant |
References
Fixes #4074
Description
After getting rid of the of /server/api request for #3961, one more /server/api check was found in the ServerCheckGuard that will be performed with every load to check if the server is not down.
This can still affect performance when a slower REST API is used.
This PR removes the initial call on load to check if the backend is up. Instead it will only perform this call if a request fails with a 500 or a 0 (Unknown) status. If the server request then fails, a redirect is done to the 500 page.
The additional check and redirect are performed in the request effects but will not hold up the rest of the object handling.
Instructions for Reviewers
To test this feature, set up a local backend and frontend where you can turn the backend on and off.
Checklist
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.